﻿using System;
using System.Collections.Generic;

namespace Ogdi.Data.DataLoader
{
    public abstract class EntityProducer
    {
        public int EntityCount { get; protected set; }

        public abstract Entity SchemaEntity { get; }

        public abstract IEnumerable<Entity> GetEntitiesEnumerator(OnContinueExceptionCallback exceptionNotifier);

        public abstract void ValidateParams();

        public static string GetSecondsFrom2000Prefix()
        {
            var seconds = (int) ((DateTime.Now.Ticks - DataLoaderConstants.InitialDateTime2000)/10000000);
            return string.Format("{0}_", seconds.ToString("D10"));
        }
    }
}